<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<head th:replace="~{home :: head}"></head>


<body>
<div th:replace="~{home :: bar}"></div>
<div class="container">
    <form action="/klass/list" method="post">
        <label>Name:</label>
        <input type="text" name="name">
        <label>Major:</label>
        <input type="text" name="major">
        <input type="submit" value="search">
    </form>
    <table border="1">
        <thead>
        <tr>
            <th>id</th>
            <th>name</th>
            <th>major</th>
            <th>Action</th>
        </tr>
        </thead>
        <tr th:each="stu:${stu1}">
            <td th:text="${stu.getId()}"></td>
            <td th:text="${stu.getName()}"></td>
            <td th:text="${stu.getMajor()}"></td>
            <td><a class="button" th:href="@{/klass/delete/{id}(id=${stu.getId})}">Delete</a>
                <a class="button" th:href="@{/klass/update/{id}(id=${stu.getId})}">Update</a></td>
        </tr>
    </table>
    <div>
        <a class="button" style="margin-top: 10px" href="/klass/create">Create</a>
    </div>
</div>

</body>
</html>